package com.kiwi.constant;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import org.apache.log4j.Logger;

import java.util.HashMap;
import java.util.Map;

public class Constant {

	public static final Logger runLog = Logger.getLogger("run.log");// 运行日志，可以往里面记录所有业务的运行日志
	public static final Logger debugLog = Logger.getLogger("debug.log");
	//Redis IP  不同环境映射
	public static final Map<String, String>  REDIS_IP_MAP= new HashMap<String, String>();
	static {  
		//Test1环境RedisIP
		REDIS_IP_MAP.put("football","172.16.38.4:6379");
		REDIS_IP_MAP.put("172.16.36.82","172.16.39.9");
	}
	public static final int REDIS_TIME_OUT = 3600 * 100;
	public static final String REDIS_PASSWORD = "8U0K65R9";
	public static final int REDIS_PORT = 6380;
	public static final String APIURLPreview = "uc.s.beikexiaodai.com";
	public static final int MOBILE_CODE_LENGTH = 6; // 短信验证码长度
	public static final String id="97619702FD39FC400822F1FAC64F854E01ED1325EC0C8F191EA754D8C9CA018F093454955C51F4B07354AC2060E463B2D437A949D13C6E7FBB7A270C3077E5FCE0485F218D309B1E49CBFF426B1125AC";
	public static final String deviceId="528C4C26-9C09-49D1-B7D8-4260DB3754DB";
	public static final String USERINFO_BY_ACCOUNTID_PREFIX = "uc_accountId_";
	public static final String USERINFO_BY_IDENTITY_PREFIX = "uc_identity_";
	public static final String USERINFO_BY_LOGINID_PREFIX = "uc_loginid_";
	/***
	 * 手机号注册登录，修改信息发送验证码
	 */
	public static final String UC_ACCOUNT_SMS_CODE = "uc_account_sms_code_";
	public static final String UC_ACCOUNT_SMS_TIME = "uc_account_sms_time_";
	//用户请求验证码的操作类型 0.注册 1.登录 2.重置
	public  static int USER_SMS_CODE_TYPE_REGISTER = 0;
	public  static int USER_SMS_CODE_TYPE_LOGIN = 1;
	public  static int USER_SMS_CODE_TYPE_RESET = 2;
	//session id redis前缀
	public static final String API_UC_SESSION = "ApiSess_";

	//json类
	public static final Gson COMMON_GSON = new GsonBuilder().create();

}
